﻿<Window x:Class="AdTech.Snap.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:tb="http://www.hardcodet.net/taskbar"
        xmlns:cmn="http://adtech-dev.com/Common"
        xmlns:local="clr-namespace:AdTech.Snap"
        Title="Snap"
        WindowStyle="None"
        ResizeMode="NoResize"
        AllowsTransparency="True"
        Background="#01000000"
        ShowInTaskbar="False"
        Visibility="Hidden">
    <Window.Resources>
        <sys:Boolean x:Key="False">False</sys:Boolean>
        <sys:Boolean x:Key="True">True</sys:Boolean>
    </Window.Resources>
    <tb:TaskbarIcon IconSource="/Snap;component/Resources/application.ico" ToolTipText="{Binding ToolTip}"
                    DoubleClickCommand="{Binding NewScreenshotCommand}">
        <i:Interaction.Behaviors>
            <local:TaskbarIconBehavior />
        </i:Interaction.Behaviors>
        <cmn:AttachedCommandBehaviour.Bindings>
            <cmn:AttachedCommandBinding Command="{Binding TrayBalloonTipClickedCommand}" Event="TrayBalloonTipClicked" />
            <cmn:AttachedCommandBinding Command="{Binding TrayLoadedCommand}" Event="Initialized" />
        </cmn:AttachedCommandBehaviour.Bindings>
        <!-- IconSource="/Snap;component/Resources/camera.ico"-->
        <tb:TaskbarIcon.ContextMenu>
            <ContextMenu>
                <MenuItem Header="New Screenshot" Command="{Binding NewScreenshotCommand}" CommandParameter="{StaticResource False}" FontWeight="Bold" />
                <MenuItem Header="Configure" Command="{Binding ConfigureCommand}" />
                <MenuItem Header="Open Drop Location" Command="{Binding OpenDestinationCommand}" />
                <MenuItem Command="{Binding EnableGlobalHotkeyCommand}">
                    <MenuItem.Style>
                        <Style TargetType="{x:Type MenuItem}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsHotkeyEnabled}" Value="False">
                                    <Setter Property="Header" Value="Enable Global Hotkey" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding IsHotkeyEnabled}" Value="True">
                                    <Setter Property="Header" Value="Disable Global Hotkey" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </MenuItem.Style>
                </MenuItem>
                <MenuItem Header="Exit" Command="{Binding CloseCommand}" />
            </ContextMenu>
        </tb:TaskbarIcon.ContextMenu>
    </tb:TaskbarIcon>
</Window>
